import http from './http'



//获取所有的用户
export let pageN = (params)=>{
    return http.get('/role/page',params);
}
//获取所有的用户
export let addRole = (data)=>{
    return http.post('/role',data);
}

export let deleteRole = (id)=>{
    return http.del(`/role/${id}`);

}
export let updateRole = (data)=>{
    return http.put('/role',data);
}
//获取所有的角色
export let option = ()=>{
    return http.get('/role/option');
}

//获取所有的角色有的权限
export let hasPermission = (id)=>{
    return http.get(`/role/permission/${id}`);
}

//分配权限
export let allocationPermission = (data)=>{
    return http.post('/role/allocationPermission',data);
}


